package model.entities;

import java.util.ArrayList;
import entities.IGarage;
import entities.IMaster;
import entities.IOrder;
import model.workerWithFile.WorkerWithFile;



public class DataBase {
	
	WorkerWithFile wwf =  new WorkerWithFile("Masters.txt","Orders.txt","Garages.txt");

	
	public ArrayList<IMaster> getMasterList() {
		return wwf.getListMastersFromFile();
	}

	public ArrayList<IGarage> getGarageList() {
		return wwf.getListGaragesFromFile();
	}

	public ArrayList<IOrder> getOrderList() {
		return wwf.getOrderFromFile();
	}

	
	public void saveGarageListToBD(ArrayList<IGarage> gar){
		wwf.saveGarageList(gar);
	}
	
	public void saveOrderListToBD(ArrayList<IOrder> ord){
		wwf.saveOrderList(ord);
	}
	
	public void saveMasterListToBD(ArrayList<IMaster> mas){
		wwf.saveMasterList(mas);
	}
	

}
